#include<bits/stdc++.h>

using namespace std;

int main()
{
	int a[5];
	int t;
	cin>>t;
	while(t--)
	{
		cin>>a[1]>>a[2]>>a[3];
		if(a[1] == a[2] && a[2] == a[3])
		{
			cout<<"1 1 1"<<endl;
		}
		else
		{
			int m = max(max(a[1],a[2]),a[3]);
			if(a[1] == m && a[2] == m)
			{
				cout<<"1 "<<"1 "<<m - a[3] + 1;
			}
			else if(a[1] == m && a[3] == m)
			{
				cout<<"1 "<<m - a[2] + 1<<" 1";
			}
			else if(a[2] == m && a[3] == m)
			{
				cout<<m - a[1] + 1<<" 1 "<<"1 ";
			}
			else
			{
				for(int i = 1; i <= 3; i++)
				{
					if(a[i] == m)
					{
						cout<<"0 ";
					}
					else
					{
						cout<<m - a[i] + 1<<" ";
					}
				}
			}
			cout<<endl;
		}
	}
	return 0;
}
